<template>
  <div id="app">
    <MyChild01 :cname="className"></MyChild01>
    <MyChild02 @send-friends="handleSendFriends"></MyChild02>
  </div>
</template>

<script>

import MyChild01 from "@/components/MyChild01";
import MyChild02 from "@/components/MyChild02";

export default {
  name: 'App',
  components: {
    MyChild01,
    MyChild02
  },
  data() {
    return {
      className: '计算机科学与技术二班',
      friends: []
    }
  },
  methods: {
    handleSendFriends(classmates) {
      console.log(classmates)
      this.friends = classmates;
    }
  }
}
</script>